<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>登录</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="//resources/demos/style.css">
  <style>
  </style>
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script src="https://shc7432.github.io/public/getLinkInput/getLinkInput.js"></script>
  <script src="https://shc7432.github.io/public/something/sometool.js"></script>
</head>
<body>

<h1>登录</h1>

<form id=frm1 method=post action="">
      <span id="lotmsg"></span><label for="user">账号</label>
      <input type="text" name="name" id="user" value="" style="width:90px;height:30px;">
      <br><label for="pw">密码</label>
      <input type="text" name="email" id="pw" value="" style="width:90px;height:30px;">
<br><button type=submit class="login">确定</button>
</form>

<script>
$(function(){
$(".login").button()
})
</script>
<script>
frm1.onsubmit=function(event){
event.preventDefault();
logi();
return false;
}
function logi(){
var unme=($("#user").val())
var pwme=($("#pw").val()).md5()
if(unme==""||pwme==""){
lotmsg.innerHTML="账号或密码错误<br>"
setTimeout("lotmsg.innerHTML=''",1500)
return;
}
var uunme=localStorage.unme/*.split(",")*/
var pwnme=localStorage.pwme/*.split(",")*/
if(uunme==null||pwnme==null||uunme==""||pwnme==""){
out1=out2=out1i=out2i=0
} else {
uunme=uunme.split(",")
pwnme=pwnme.split(",")
var i,out1=false,out2=false
for(i=0;i<uunme.length;i++){
out1=out1||(unme==uunme[i])
out1i=i
}
for(i=0;i<pwnme.length;i++){
out2=out2||(pwme==pwnme[i])
out2i=i
}
}
if(out1&&out2&&(out1i==out2i)){
lotmsg.innerHTML="登录成功!账号"+setCookie("signin",unme,120)+"<br>"
} else {
lotmsg.innerHTML="账号或密码错误<br>"
setTimeout("lotmsg.innerHTML=''",1500)
}
    }
</script>

</body>
</html>
